com.supermap.ar.areffect.preset
Class BaseShape
- java.lang.Object
-
- com.supermap.ar.areffect.preset.BaseShape
-
- Direct Known Subclasses:
- ARGeometry, Shape
public class BaseShape extends java.lang.Object
Base shape class Point, line, region
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
BaseShape.MatType
Texture types OPAQUE transparent texture TRANSPARENT opaque texturestatic class
BaseShape.Mode
Drawing mode TRIANGLE_FAN The first point and next two adjacent points compose a triangle.
-
Constructor Summary
Constructors Constructor and Description BaseShape(BaseShape.MatType matType)
Construction method
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
clear()
Clear shapeColor
getColor()
Gets the colorfloat[]
getColorRGBA()
Gets the RGBA value of the colorfloat
getMetallic()
Gets metallicityAREffectElement
getParentElement()
Get the parent nodefloat
getRadius()
float
getReflectance()
Gets reflectancefloat
getRoughness()
Gets roughnessColor
getSelectionColor()
Gets the rendering object under the selection statusMaterial
getShapeMaterial()
ShapeStyle
getShapeStyle()
Get style styleint
getTextureMap()
Gets the resource id of the texture mapboolean
isRenderable()
Renderable or not default trueboolean
isSelected()
Determines whether it is selectedboolean
isShadowCaster()
Whether the rendered shape can generate shadowboolean
isShadowReceiver()
Whether the rendered shape accepts shadowvoid
select()
Selectedvoid
setColor(Color color)
Sets the colorBaseShape
setColor(float r, float g, float b, float a)
Sets the color through its RGBA valueBaseShape
setColor(java.lang.String colorString)
Sets the colorBaseShape
setMetallic(float metallic)
Sets metallicityvoid
setParentNode(AREffectElement element)
Setting the parent nodevoid
setParentNode(EffectView arView)
Setting the parent nodevoid
setRadius(float radius)
BaseShape
setReflectance(float reflectance)
Sets reflectanceS
setRenderable(boolean renderable)
Sets whether the object is renderable Defaults to true, when set to false, the object drawn will not be rendered in the sceneBaseShape
setRoughness(float roughness)
Sets roughnessvoid
setSelectionColor(Color color)
Sets the color of the rendering object under the selection statusBaseShape
setShadowCaster(boolean shadowCaster)
Sets whether to generate the shadow effectBaseShape
setShadowReceiver(boolean shadowReceiver)
Sets the effect after accepting shadowvoid
setShapeStyle(ShapeStyle shapeStyle)
Set style styleBaseShape
setTextureMap(int textureMap)
Sets imagesvoid
unSelect()
Cancel the selected statusvoid
updateMaterial()
Update texture
-
-
-
Constructor Detail
-
BaseShape
public BaseShape(BaseShape.MatType matType)
Construction method- Parameters:
matType
- texture type (transparent/opaque)
-
-
Method Detail
-
getSelectionColor
public Color getSelectionColor()
Gets the rendering object under the selection status- Returns:
-
setSelectionColor
public void setSelectionColor(Color color)
Sets the color of the rendering object under the selection status- Parameters:
color
-
-
isSelected
public boolean isSelected()
Determines whether it is selected- Returns:
-
select
public void select()
Selected
-
unSelect
public void unSelect()
Cancel the selected status
-
getRadius
public float getRadius()
-
setRadius
public void setRadius(float radius)
-
getTextureMap
public int getTextureMap()
Gets the resource id of the texture map- Returns:
-
setTextureMap
public BaseShape setTextureMap(int textureMap)
Sets images- Parameters:
textureMap
-- Returns:
-
isShadowReceiver
public boolean isShadowReceiver()
Whether the rendered shape accepts shadow- Returns:
-
setShadowReceiver
public BaseShape setShadowReceiver(boolean shadowReceiver)
Sets the effect after accepting shadow- Parameters:
shadowReceiver
-- Returns:
-
isShadowCaster
public boolean isShadowCaster()
Whether the rendered shape can generate shadow- Returns:
-
setShadowCaster
public BaseShape setShadowCaster(boolean shadowCaster)
Sets whether to generate the shadow effect- Parameters:
shadowCaster
-- Returns:
-
getMetallic
public float getMetallic()
Gets metallicity- Returns:
-
setMetallic
public BaseShape setMetallic(float metallic)
Sets metallicity- Parameters:
metallic
-- Returns:
-
getRoughness
public float getRoughness()
Gets roughness- Returns:
-
setRoughness
public BaseShape setRoughness(float roughness)
Sets roughness- Parameters:
roughness
-- Returns:
-
getReflectance
public float getReflectance()
Gets reflectance- Returns:
-
setReflectance
public BaseShape setReflectance(float reflectance)
Sets reflectance- Parameters:
reflectance
-- Returns:
-
getColorRGBA
public float[] getColorRGBA()
Gets the RGBA value of the color
-
getColor
public Color getColor()
Gets the color- Returns:
-
setColor
public BaseShape setColor(java.lang.String colorString)
Sets the color- Parameters:
colorString
- color string, eg: "#ffffff"- Returns:
-
setColor
public void setColor(Color color)
Sets the color- Parameters:
color
-
-
setColor
public BaseShape setColor(float r, float g, float b, float a)
Sets the color through its RGBA value- Parameters:
r
-g
-b
-a
-- Returns:
-
updateMaterial
public void updateMaterial()
Update texture
-
clear
public void clear()
Clear shape
-
setShapeStyle
public void setShapeStyle(ShapeStyle shapeStyle)
Set style style- Parameters:
shapeStyle
- shape风格
-
getShapeStyle
public ShapeStyle getShapeStyle()
Get style style- Returns:
ShapeStyle
style
-
getShapeMaterial
public Material getShapeMaterial()
-
isRenderable
public boolean isRenderable()
Renderable or notdefault true
- Returns:
- boolean
-
setRenderable
public S setRenderable(boolean renderable)
Sets whether the object is renderableDefaults to true, when set to false, the object drawn will not be rendered in the scene
- Parameters:
renderable
- boolean
-
setParentNode
public void setParentNode(AREffectElement element)
Setting the parent node- Parameters:
element
-
-
setParentNode
public void setParentNode(EffectView arView)
Setting the parent node- Parameters:
arView
-
-
getParentElement
public AREffectElement getParentElement()
Get the parent node- Returns:
-
-